﻿<Window x:Class="YLClient.Froms.NewItem"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="定制" Loaded="Window_Loaded" WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterScreen" AllowDrop="True" ResizeMode="NoResize" DragEnter="Window_DragEnter" DragLeave="Window_DragLeave" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:my="clr-namespace:YLClient.UserControls" Height="466" Width="368">
    <Window.Resources>

    </Window.Resources>

    <Grid Margin="0,10,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.Resources>
                <Style  TargetType="TextBlock">
                    <!--不设置key，代表应用所有的该类控件-->
                    <Setter Property="HorizontalAlignment" Value="Center"/>
                    <Setter Property="Height" Value="30"/>
                </Style>
                <Style TargetType="TextBox">
                    <Setter Property="Height" Value="23"/>
                    <Setter Property="Width" Value="120"/>
                </Style>
                <Style TargetType="Button">
                    <Setter Property="Height" Value="50"/>
                </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" 
                       Name="textBlock1" Text="模板:" Padding="0" />
            <ComboBox Grid.Row="0" Grid.Column="1" 
            Height="23"   Name="cmbTemplateName"  Width="120" TabIndex="1" />

            <TextBlock Grid.Row="1" Grid.Column="0"  Name="textBlock2" Text="婚礼时间:"  />
            <my:TimePick Grid.Row="1" Grid.Column="1" 
            HorizontalAlignment="Left"  x:Name="timePick"  Height="57" Width="205" TabIndex="2" />
            <TextBlock Grid.Row="2" Grid.Column="0"  Name="textBlock3" Text="新郎:" />
            <TextBox Grid.Row="2" Grid.Column="1"
            Name="txtbGril"  TabIndex="4"  />
            <TextBlock Grid.Row="3" Grid.Column="0"
             Name="textBlock4" Text="新娘:"  />
            <TextBox  Grid.Row="3" Grid.Column="1"
           Name="txtbBoy"  TabIndex="3" />
            <TextBlock Grid.Row="4" Grid.Column="0"
           Name="textBlock5" Text="照片:"  />
            <TextBlock  Grid.Row="4" Grid.Column="1"
            Height="37"  Name="textBlock6" Text="请直接将图片或文件夹拖放至本窗体"  TextWrapping="Wrap" Width="109" TextTrimming="WordEllipsis" IsHitTestVisible="True" />
            <Button Name="btnDataContainer" Visibility="Hidden" />
            <!--
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="36,23,0,0" Name="textBlock1" Text="模板:" VerticalAlignment="Top" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="35,62,0,0" Name="textBlock2" Text="婚礼时间:" VerticalAlignment="Top" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="36,136,0,0" Name="textBlock3" Text="新郎:" VerticalAlignment="Top" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="36,180,0,0" Name="textBlock4" Text="新娘:" VerticalAlignment="Top" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="36,228,0,0" Name="textBlock5" Text="照片:" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="119,177,0,0" Name="txtbGril" VerticalAlignment="Top" Width="120" TabIndex="4" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="119,133,0,0" Name="txtbBoy" VerticalAlignment="Top" Width="120" TabIndex="3" />
        <Button  Content="添加" Height="35" HorizontalAlignment="Left" Margin="127,271,0,0" Name="btnAdd" VerticalAlignment="Top" Width="Auto" Click="btnAdd_Click" MinWidth="89" TabIndex="5" FontStretch="Normal" HorizontalContentAlignment="Center" />
        <TextBlock Height="37" HorizontalAlignment="Left" Margin="119,228,0,0" Name="textBlock6" Text="请直接将图片或文件夹拖放至本窗体" VerticalAlignment="Top" TextWrapping="Wrap" Width="109" TextTrimming="WordEllipsis" IsHitTestVisible="True" OverridesDefaultStyle="False" />
        <Button Name="btnDataContainer" Visibility="Hidden" />
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="245,23,0,0" Name="textBlock7" Text="*" VerticalAlignment="Top" Foreground="Red" />
        <TextBlock Foreground="Red" Height="23" HorizontalAlignment="Left" Margin="245,180,0,0" Name="textBlock8" Text="*" VerticalAlignment="Top" />
        <TextBlock Foreground="Red" Height="23" HorizontalAlignment="Left" Margin="245,136,0,0" Name="textBlock9" Text="*" VerticalAlignment="Top" />
        <DockPanel VerticalAlignment="Bottom" Height="193">
            <ProgressBar DockPanel.Dock="Bottom" Height="20" HorizontalAlignment="Stretch" Margin="0" Name="progressBar" VerticalAlignment="Bottom" Width="Auto" Value="0" Visibility="Visible" />
            <TextBlock DockPanel.Dock="Bottom" Text="准备就绪" Name="txtbStatus" />
            <ListBox DockPanel.Dock="Bottom" Height="143" HorizontalAlignment="Center" Margin="0" Name="lstFileNames" VerticalAlignment="Bottom" Width="204" MaxHeight="150" 
                  ItemsSource="{Binding ElementName=btnDataContainer, Path=Content}" Padding="0,0,0,10" SelectionMode="Extended">
                <ListBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Name="del1" Header="删除" Command="ApplicationCommands.Delete" CommandParameter="single" />
                        <MenuItem Name="delAll" Header="全部删除" Command="Delete" CommandParameter="all" />
                    </ContextMenu>
                </ListBox.ContextMenu>
            </ListBox>
        </DockPanel>
        <TextBlock Foreground="Red" Height="23" HorizontalAlignment="Left" Margin="245,228,0,0" Name="textBlock10" Text="*" VerticalAlignment="Top" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="119,19,0,0" Name="cmbTemplateName" VerticalAlignment="Top" Width="120" TabIndex="1" />
        <my:TimePick HorizontalAlignment="Left" Margin="119,52,0,0" x:Name="timePick" VerticalAlignment="Top" Height="57" Width="205" TabIndex="2" />-->

        </Grid>
        <Button  Grid.Row="1" 
                 Height="50" Width="100"
            Content="添加"  Name="btnAdd" VerticalAlignment="Top"  Click="btnAdd_Click" MinWidth="89" TabIndex="5" FontStretch="Normal" />
        <DockPanel  Grid.Row="2"  
            VerticalAlignment="Stretch" Height="Auto" HorizontalAlignment="Stretch">
            <ProgressBar DockPanel.Dock="Bottom" Height="20" HorizontalAlignment="Stretch" Margin="0" Name="progressBar" VerticalAlignment="Bottom" Width="Auto" Value="0" Visibility="Visible" />
            <TextBlock DockPanel.Dock="Bottom" Text="准备就绪" Name="txtbStatus" />
            <ListBox DockPanel.Dock="Bottom" 
                   HorizontalAlignment="Stretch" Name="lstFileNames" VerticalAlignment="Stretch" Width="Auto" MaxHeight="150" 
                  ItemsSource="{Binding ElementName=btnDataContainer, Path=Content}" Padding="0" SelectionMode="Extended" Margin="10,0">
                <ListBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Name="del1" Header="删除" Command="ApplicationCommands.Delete" CommandParameter="single" />
                        <MenuItem Name="delAll" Header="全部删除" Command="Delete" CommandParameter="all" />
                    </ContextMenu>
                </ListBox.ContextMenu>
            </ListBox>
        </DockPanel>
    </Grid>
</Window>
